import os
import sys
import django

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zyy_django.settings")
django.setup()

from apps.Detail.models import ViewerRecordModel


import random


# 暂且都指定用户访问了id为36的的文章
for i in range(10):
    ViewerRecordModel.objects.create(
        user_id=random.randint(1,10),
        article_id=36
    )